<template>
  <div>
    <headUser></headUser>
    <!--<div class="prompt">可查看近24个月的发放记录</div>-->
    <div class="main">
      <div v-show="isNull" class="no">
        <img src="../../assets/images/no_infor.png"/>
        <p>暂无数据！</p>
      </div>
      <div v-show="!isNull" class="item" @click="toDetail">
        <div class="it_hd">
          <span class="time">2018-5-8</span>
        </div>
        <div class="it_hb">
          <div>
            <span>单位</span>
            <span>浙江网新恩普软件有限公司</span>
          </div>
          <div>
            <span>月领取待遇金额</span>
            <span>2800.95元</span>
          </div>
          <div>
          <span>审核结果</span>
          <span class="color1">待审核</span>
        </div>
        </div>
      </div>
      <div v-show="!isNull" class="item">
        <div class="it_hd">
          <span class="time">2018-5-8</span>
        </div>
        <div class="it_hb">
          <div>
            <span>单位</span>
            <span>浙江网新恩普软件有限公司</span>
          </div>
          <div>
            <span>月领取待遇金额</span>
            <span>2800.95元</span>
          </div>
          <div>
            <span>审核结果</span>
            <span class="color2">通过</span>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
  export default {
    name: 'index',
    data () {
      return {
        dataList: [],
        token: localStorage.getItem("token"),
        isNull: false,
        userInfo:[]
      }
    },
    methods: {
      getData(){
        this.$http.get("/jkakrs_ylbx_003", {
          params: {
            access_token: this.token,
            AAC002: this.userInfo.certnum,
            AAC003:this.userInfo.name,
          }
        }).then(res => {
          console.log(res)
          if (res.success) {
            this.dataList = res.body;
          }else {
              this.isNull=true;
          }
        });
      },
      toDetail(){
          this.$router.push({path:'/injuryDetail'})
      }
    },
    created() {
      let userInfo=JSON.parse(localStorage.getItem("userInfo"));
//      this.getData();
    }
  }
  document.body.style.background=" #F2F2F2";
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
  .main,.prompt{padding: 0 15px 0 15px;box-sizing: border-box;}
  .prompt{font: 14px/14px "";margin-top: 16px;margin-bottom: 14px;color: #888888;box-sizing: border-box;font-size: 14px;}


  .main .item{border-radius: 5px;margin-bottom: 15px;box-shadow: 1px 1px 5px #C2E1FF;}
  .main .item .it_hd{background: #3399FF;border-radius: 3px 3px 0 0;box-sizing: border-box;padding: 0 15px 0 15px;color: #FFFFFF;position: relative;font-size: 14px;line-height: 25px;height: 25px;}
  .main .item .it_hd .time{font-family: arial;}
  .main .item .it_hd .state{position: absolute;right: 15px;}
  .it_hd>span{color: #ffffff;}
  .main .no{text-align: center;margin-top: 40px;}
  .main .no img{width: 45%;margin-top: 30px;}
  .main .item .it_hb{background: #FFFFFF;border-radius: 0 0 5px 5px;box-sizing: border-box;padding: 16px 15px 16px 15px;}
  .main .item .it_hb div{position: relative;}
  .main .item .it_hb div span:first-child{color: #888888;font-size: 13px;line-height: 30px;}
  .it_hb span:last-child{float: right;}
  .main .item .it_hb div.t{display: inline-block;width: 48%;}
  .color1{color: #E08F0A;}
  .color2{color: #3399FF;}
</style>
